<!DOCTYPE html>
<html>

<head>
<style>
div {
  border: 1px solid black;
  font-family: monospace;
  width: 10ch;
}
</style>
</head>

<body>
<div>
  <span style="direction: rtl;">
    <span style="unicode-bidi: bidi-override; color: blue;">abcd abcd abcd</span>
    foo
  </span>
</div>
</body>

</html>
